
/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
	const { router, controller, middleware } = app;
	const tokenAuth = middleware.tokenAuthentication();

	/**
	 * 公共模块
	 */
	router.post('/api/upload', tokenAuth, controller.common.upload);

	/**
	 * 前台管理模块
	 */
	require("./api/user")(app);

	/**
	 * 后台管理模块
	 */
};
